package tk.mybatis.simple.generator.mapper;

import org.apache.ibatis.annotations.CacheNamespaceRef;
import tk.mybatis.simple.generator.model.SysUser;

import java.util.List;
import java.util.Map;

@CacheNamespaceRef(SysUserMapper.class)
public interface SysUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    List<SysUser> selectAll();

    int updateByPrimaryKey(SysUser record);

    SysUser selectUserAndRoleById(Long id);

    SysUser selectUserAndRoleById2(Long id);

    SysUser selectUserAndRoleByIdSelect(Long id);

    List<SysUser> selectAllUserAndRoles();

    List<SysUser> selectAllUserAndRolesSelect(Long id);

    void selectUserById(SysUser sysUser);

    List<SysUser> selectUserPage(Map<String,Object> params);

    int insertUserAndRoles(SysUser user, String roleIds);

    int deleteUserById(Long id);
}